package org.jeecg.modules.task;

import org.apache.http.client.methods.HttpGet;

/**
 * @author zhengch
 * @date 2021年09月22日 3:52 下午
 */
public class HttpGetUtil {

    private static  volatile HttpGet httpGet;

    private  HttpGetUtil(){}

    //单例模式取httpclient客户端
    public  static  HttpGet getInstance(){
       if (httpGet == null){
          synchronized (HttpGetUtil.class){
              if (httpGet == null){
                  httpGet = new HttpGet();
                  httpGet.setHeader("Accept","application/json");
                  httpGet.setHeader("Content-Type","application/json;charset=UTF-8");
                  httpGet.setHeader("authorization","WDCXXGL");
              }
          }
       }
      return  httpGet;
    }


}
